<template>
    <view style="width: 100%;height: 100vh;color: white;" class="flex_column">
        <!-- 首页 -->
        <page-head></page-head>
        <view style="padding: 2vh;flex:1;" class="flex_col">
            <view class="allCenter rem04">
                高级设置
            </view>
            <view class="set-con " style="flex:1;">
                <view class="set-cont rem04" style="flex:1">

                    <view class="allCenter rem03" style="width:50vh;">
                        请先通过管理员认证
                    </view>
                    <view class="alignCenter" style="width:50vh;margin-top: 4vh;">
                        <view class="input-con" style="height: 7vh;flex: 1;">
                            <input class="rem03" style="flex: 1;padding-left: 1vh;" type="password" v-model="admin_pwd" placeholder="请输入管理员密码"
                                placeholder-style="color: #FFFFFF;opacity: 0.3;" />
                        </view>
                    </view>

                    <view class="alignCenter" style="width:50vh;margin-top: 10vh;">
                       <button style="background: #44CE7B;border-radius: 1vh;" @click="sure()">
                       	<view style="padding: 0.2vh 2vh;">确认</view>
                       </button>
                    </view>



                </view>
            </view>
        </view>

    </view>


</template>

<script>
    export default {
        data() {
            return {
                admin_pwd:'',
                btnArr: ["YL-8系", "YL-6系", "YL-4系"],
                typeTxt: "",
                open: true,
                name: '店员1',
                nameArr: ['店员1', '店员2', ],
                // index:0
            }
        },
        onShow: function() {
            this.typeTxt = this.btnArr[getApp().globalData.type];

            // console.log(getApp().globalData.type)
        },
        methods: {
            sure(){
              console.log(this.admin_pwd)
              if (this.admin_pwd=="123456"){
                this.navigateTo('/pages/set/set')
              }else{
                return uni.showToast({
                  title:'密码错误，请输入正常的密码',
                  icon:'error'
                })
              }
            },
            bindPickerChange: function(e) {
                console.log('picker发送选择改变，携带值为', e.target.value)
                // this.index = e.target.value
                this.name = this.nameArr[e.target.value];
            },
            navigateTo(url) {
                uni.navigateTo({
                    url: url
                })
            },
            back_click() {
                uni.navigateBack({
                    delta: 1
                })
            }
        }
    }
</script>

<style>
    page {
        background: #1E2238;
    }

    .set-con {
        opacity: 0.98;
        background: #3E4469;
        border-radius: 2vh;
        margin-top: 5vh;
        display: flex;
        flex-direction: column;
        margin-bottom: 10vh;
    }

    .set-cont {
        background: #4A5079;
        border-radius: 2vh 2vh 0 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* padding-right: 10vh; */
    }

    .set-cont-title {
        padding-right: 3vh;
        width: 20vh;
        text-align: right;
    }

    .input-con {
        background: #646B97;
        border-radius: 2vh;
        height: 30px;
        display: flex;
        align-items: center;
        padding: 0 0.2rem;
    }

    .open-con {
        background: #000;
        border-radius: 2vh;
        height: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 0.08rem;
    }

    .open-btn {
        background: #646B97;
        border-radius: 2vh;
        height: 7.5vh;
        width: 15vh;
        flex: 1;
        justify-content: center;
        display: flex;
        align-items: center;
    }

    .dian {
        width: 0.2rem;
        height: 0.2rem;
        background: #fff;
        border-radius: 0.1rem;
        margin-right: 2.5vh;
    }

    .set-btn-con {
        padding: 2vh 10vh;
        display: flex;
        justify-content: center;
    }

    .input::-webkit-input-placeholder {
        font-size: 3vh;
    }
</style>
